Add checks if main object exists