Fix for bug #8297
Fixed getting the policy_hash_list which can fail if elements are null
[SeeRM #89297]
Land #2241 - Fix undefined method `text' for nil:NilClass