Check for null pointer before applying memwipe()