improve error reporting in _InputArray methods