Also check certificates != NULL.