Ensure correct type.