Check if p is int and remove whitespace.