Update to handle null cases.