Ensure correct type