try remove if data != NULL