Fix inconsistent quotes
Refactor if statement