error handling for array extension methods