Are the following sentences grammatically correct?
A: He is nice and a grocer.
B: He is nice and is a grocer.
They are both "correct" in the sense there's nothing much ungrammatical there.
However, we do not propagate POSs and clauses forward across disparate things like a person's disposition (nice) and occupation (grocer). The overall semantic coherence is effected.
Not just the is but also the He needs to be provided again.
He is nice and he is a grocer.
There is a word for the first example, He is nice and a grocer. It is called zeugma, meaning yoking, an allusion, I suppose, to the biblical injunction not to yoke an ox with an ass. The device can be used to literary effect: "Eggs and promises are easily broken." The absurdity of joining the statements of this fellow's disposition and his profession is not much helped by making two clauses by inserting a second "he is" unless you want to suggest it is unusual for a grocer to be nice.