You’re basically selecting every element by its category, so there are two issues I see with this agressive collection method when it comes to your desired output:
Cleaning the list will certainly help.
Confirm that every element type in each category has a keynote parameter to work with. I doubt the following element types have this parameter available: views including filters and templates, revisions, sheets, parameters themselves, project information, electrical loads, area separation lines, sketch lines, text, dimensions, keynotes themselves (yep you selected those too).
Instead I would recommend you select all elements (as you are is fine but a more controlled method may be in order), ask if the parameter exists, filter out elements which don’t have the parameter, and then get the values.