Changed the way in which attrs were checked
Changed the way in which attrs were checked

Some memory metrics were failing because of the way
presence of attributes were checked, changed it to
a more explicit way, by using the hasattr(object, attr)
function. This is intended to fix the bug.

Change-Id: I9bf6d211679589608ca5a5bb5fd5b5a0688261ea
Closes-Bug: #1498190

sapcc/monasca-agent,sapcc/monasca-agent,sapcc/monasca-agent