fixed bug that caused name gender to crash if the input was a string containing only spaces.