catch NoMethodError exception thrown by .try