Return undefined instead of throw for toMethod, for methods that don't exist