Remove redundant if statement in strip()