The function appears to work for all input words tested, but it does not work for non-word inputs, such as numbers or symbols.

Is this description and domain correct? Please provide any additional input or feedback you would like me to consider.