When i write a function in JS or jQuery and a parameter is required, i use the if something.length trick...