added some arguments validation clauses for generalised C strings and buffers