id checks to avoid not set errors