Added null check on `actionListener`.