fixed: when nil passed, NoMethodError raised