Changed output sanity checks to 'in' rather than 'hasattr'
'