Fix Possible Null Pointer De-reference.

strstbl_len = encoder->strstbl_len;  can cause crash in de-referencing encoder, if Null check is done after this statement.
Applied Null check at appropriate place.