Question: I am getting a very strange client side javascript error when using asp.net ajax tool kit.

I am using user controls with a timer inside of an update panel to make call backs to the server
the error is Type Sys.UI.\_Timer has already been registered

I can't recreate the issue at all when debugging the site localy or if the site is published on my machine, The error only happens when the site is published to our QA machine and only happens in IE and only happens on 2 out of the 6 machines we have used to access it.

Answer: 
Returning null means the caller must ALWAYS check the result from your method. Meaning MORE miserable null checks. 

Consider using the NullObject pattern instead, where you return a valid object but having empty operations. I.e. an empty list if a collection is returned or similar.
In my experience, Java apps are easier to maintain if the default 'contract' for any API is that `null` parameter values and `null` results are not allowed. If a method is designed to allow a `null` argument or returns a `null`, the meaning and circumstances should be clearly specified in the Javadoc. 

If an `null` is passed where the API does not specifically allow this, it is a bug and the best thing is to fail-fast with an NPE. (IMO, there is no need to document the possibility of an NPE ... it can be assumed.) If `null` is not a meaningful (documented) argument value, the practice of testing for `null` and returning `null` only serves to spread bad data and make it harder to debug your code. If your method uses the supplied `null` argument and that causes an NPE, so be it. If does not use the argument but it saves the value for future use, then it is worth testing for null and explicitly throwing a NPE.

I also try to avoid the (usually false) optimizations of using `null` to represent empty lists or empty arrays, at least at the API level.

Now there are situations where it makes sense for an API design to use `null`s; e.g. in APIs where an object parameter implements some kind of plugin behavior / policy, or the `null` is used when an optional method parameter is not supplied. But you need to think about it and document it.