check if amount is undefined