Resolution: You need to bind the workflowProperties object properly. I have mentioned steps below:
In the workflow designer go to your initial state anc clidk on the event driven activity to reach the on workflow activated event
Now in its properties window, notice workflowproperties , it will be empty, from there select the workflowProperties from dropdown. This way it will get binded the next time you try to run the workflow.
Once you do that, it will no longer be null and will give you any serialized data that you require while initiating the workflow.