Price functions return zero when either asset() was not yet called or the price history contains no data at or before that bar. In all other cases they should not be zero. Or else it would be a bug.