Replaced "if !" with "unless" to make it more readable.