Added condition to check if project contains project item. #844