Added NULL pointer checking to all friend operators.