Check if string before assignment