You can use StringUtils utility method here to skip whitespaces too