Added hasName method

Added the method requested in Issue #4784.