Determining if a Function Meets Certain Conditions