File_exists does something weird, it does not say if a file exists, it says if path exists. So, to check if it is a file then you should use is_file together with file_exists to know if there is really a file behind the path, otherwise file_exists will return true for any existing path.
Example:
if((is_file($filePath))&&(file_exists($filePath))){ return true; } else{ return false; }
What do you think?