Catch nosuchmethod error