Updated to use more robust gender check

@AndyMenzies, please can you review ready for release 1.5.0