adding some validation functions to utils