Bitcoin-Qt: extend some checks for valid model pointers