The force-level check in org-paste-subtree seems to contain a small bug.
If I try to paste a subtree at the end of a line only containing some
stars, I get an error Wrong type argument: number-or-marker-p, nil.
The problem is (- (match-end 1) (match-end 1)) (see below)
We have no subexpression to match, it should be zero.
(force-level (cond (level (prefix-numeric-value level))
((and (looking-at [ \t]*$)
(- (match-end 1) (match-beginning 1)))
(- (match-end 0) (point) 1