fixed null reference error when no options is specified in put function.

when calling "document.put(id, data, callback)" a "null reference error" would occur on the "if(options.forceUpdate...)" statement. This is because the "if(typeof options == 'function')" check set the options to null and the options null check was done before. I moved the options null check to after the function check to be consistent with the other functions in document.js