add null check in on project