Remove type warning by letting compiler know collection is a List