Simplified code in plugin.rb

remove nil check