Safely join arrays

 * Adapted from array_join gem:
 * https://github.com/marcandre/rails_join/blob/master/lib/rails_join.rb