When checking the window type for a resize command, first check to see if the window property is null before checking whether or not it is a dock window. The window may be null in the case it is a branch container. fixes #1220