Use `unless` instead of `if not`.  It is more idiomatic Ruby.