Fix NULL argument handling in mbedtls_xxx_free() functions

Signed-off-by: Troy-Butler <squintik@outlook.com>
diff --git a/library/block_cipher.c b/library/block_cipher.c
index 04cd7fb..51cdcdf 100644
--- a/library/block_cipher.c
+++ b/library/block_cipher.c
@@ -51,6 +51,10 @@
 
 void mbedtls_block_cipher_free(mbedtls_block_cipher_context_t *ctx)
 {
+    if (ctx == NULL) {
+        return;
+    }
+
 #if defined(MBEDTLS_BLOCK_CIPHER_SOME_PSA)
     if (ctx->engine == MBEDTLS_BLOCK_CIPHER_ENGINE_PSA) {
         psa_destroy_key(ctx->psa_key_id);