[PATCH 5.4 25/62] chtls: Added a check to avoid NULL pointer dereference