Add stricter check to "deserialize"