making a strict check for types