adding null checks to update action