On Stetkaer type functional equations and Hyers--Ulam stability