'title' and the others should probably be wrapped in conditionals similar to how you conditionalized 'icon'