normalizing undefined to null. fixing quoting.