They meant that if either of the two strings you pass in is neither "male" nor "female", your function doesn't know what to return because none of your if's covers that case.
You always need to have a path that returns something, so you need to think of some reasonable return value for invalid input or throw an exception like Samarichitane suggested.