The pointers are dereferenced immediately, so assert the cast is correct instead of returning nullptr