Update policies.py

Deffensive coding