Cycles Renderer : Reuse attribute query utilities
Cycles Renderer : Reuse attribute query utilities

This fixes a bug where we weren't dealing with the possible null return from `reportedCast()`.

GafferHQ/gaffer,GafferHQ/gaffer,andrewkaufman/gaffer,johnhaddon/gaffer,andrewkaufman/gaffer,GafferHQ/gaffer,andrewkaufman/gaffer,andrewkaufman/gaffer,andrewkaufman/gaffer,GafferHQ/gaffer,GafferHQ/gaffer,johnhaddon/gaffer,johnhaddon/gaffer,johnhaddon/gaffer,johnhaddon/gaffer