Prevent exception when querying non-cached models