Use `defined?` instead for Rails 2 compatibility