Tested checkForWhiteSpace.