First test for parameter, then use it

One should test if a parameter exists before using it instead of letting the PHP auto-type conversion magic have its way with it.