can be moved into if condition.  nil check is redundant