Check if errorCallback is defined before calling.