Remove nil items from the handler list when deriving handlers