Added hasName method

Added the method requested in Issue #4784.
There should be 2 spaces between each word, not 1.