add validation to divide budget function and prevent fatal error