fixes #4485 prevents undefined method `include?\' for nil:NilClass