how to check if string contains space