fix(internal): Correct potential nil pointer err