Added NULL check to chop_words

In the spirit of segfault protection, a check to see if the provided
parameter pointer was NULL has been added to this function.