created a conditional if for empty value in input item