The domain of the function is all word inputs, but the function only applies its rule to valid place names. Inputs that are not valid place names will return undefined.

Please let me know if this description is correct or if there are any other inputs you would like me to test.