Simplied code as null check is redundant