osd: fix blkid and osd_id detection with strict_variables

When strict_variables is enabled on the puppetmaster, scope.lookupvar()
fails hard when the variable doesn't exist. So we need to explicitely
check wether it exists or not.