This if statement is a little suspect. If amount is None, assign amount to None? It seems to me that's unnecessary :)