Check and prevent spaces