Added nullcheck