constrain string also for optional strings