Removed the redundant test for NoMethodError check.