add more NULL check on hook _fn (s)