Get rid of runtime errors, return empty string if 'elem' has no 'prop' attribute.