Wrapping af_get functions in AF_CHECK macro