fix polymorphic_type_override to check for nil reflections

Change-Id: Id0b2789adc303cd5d7d605a442236c738a6eac06
Reviewed-on: https://gerrit.instructure.com/29909
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: James Williams  <jamesw@instructure.com>
Product-Review: Landon Wilkins <lwilkins@instructure.com>
QA-Review: Landon Wilkins <lwilkins@instructure.com>