Try here for some information on the Parameter.StorageType values: http://spiderinnet.typepad.com/blog/2011/04/parameter-of-revit-api-5-parametertype-and-storagetype.html
You shouldn't really use a "magic" number like 2
here, instead, it should probably be
parameter.StorageType == `StorageType.Double`
Basically, what the line is doing, is making sure, that the parameter
- was retrieved
- the value's type is a
double
, a floating point number - has a value
Read the developer documentation on how the parameters work.