attr_safe_get function

Safely extract an attribute from a named list