Add more error checking to overloaded operators in array