adds getOrThrow method