Synthesis, characterisation, optical and nonlinear optical properties of thiazole and benzothiazole derivatives: a dual approach