bugfix to a null check that failed due to lint fix PR