I'd rather have a rifle, like an AR15, over any pistol.
You draw to much attention when you go out to a restaurant. Handgun is a little less obvious.
Hasbeen
First sentence from the OP stated 'home defense'.
And he stated, "I'm thinking of getting a handgun to train with and keep in a small locked safe by the bed." No mention of CCW or taking it into public.