Dynamo Revit - Python block to make a selection of elements with a specific parameter value

Thanks for guiding. This worked in local sample projects but getting some NoneType object has no attribute AsString error in live project. I created a separate post for it.