Adding id check