CheckIfExists validation function works