Small if refactor