If condition for .attr(“stroke-dasharray”, function (d) (…)} d3.js

I am trying to implement stroke-dasharray for one line usinf if-else condition. But It’s not working. Can someone have a look at it and tell what is wrong here ?

    .attr("stroke-dasharray", function (d) {
      if (d.type != "Stpe") return ('3, 3');
      else
      return null;
    })
    

I want to make the red line in solid and other in dashed.
Image

Follwing is the data of red line of one point. Only the red line has “type”: “Step”.

{
"status": 1,
"resource_name": "Step 1",
"type": "Step",
"ld": [0, 0],
"pathway_name": "pathway1"
 },

What I am not able to do right here ?