Remove unnecessary if in append method by setting initial value to @input