improve input checks in Ruby action classes