Simplify check for NULL since free is indifferent to it