GH36: Add casts to match the documentation