Made rectangle parameter optional.

You check to see if rectangle is null in the function so I'm guessing you forgot to set the parameter's default value to null. Fixed.