Will workflow method be processed first or Signal

I start my workflows like this :

WorkflowExecution execution = WorkflowClient.start(workflow::workflowmetod, data);

and inside workflow i save the data (original input) as a member variable.

subsequently i send many signals to workflow using

Myworkflow mywf = workflowClient.newWorkflowStub(Myworkflow .class, workflowId);

This works perfect under normal scenario.

However under load, or when worker is not available immediately to process the newly submtited workflow and if the workflow is signalled as well in the mean while, i see that worker attempts to process the signal first prior to to the workflow method.
In my usecases, i need the inital input necessarily for processing the signals and i end up reading this as null.

Is there any way to ensure that the workflow method get invoked prior to the signal?

This seems some kind of race conditon at the start of workflow and worker gives priority to signals over the workflow method.

This is by design as there are use cases when it is necessary to know that signal was received before the workflow method started execution. So make sure that your code can handle signal callback to be invoked before the main workflow method without throwing NPE.