validation for numeric functions