you might also factor out `(day == null || period....
# codereview
u
you might also factor out
(day == null || period.day == day)
as
Any?.match(Any)