Impossible to access an attribute (\"custom_endpoint\") on a NULL variable

My setup obviously does not have a authentication property set. This change fixes the error.