Please do not default `join_type` to `nil`.  I don't think `nil` is actually an acceptable value.  Change the things that call `build_join_query` to actually pass in the things it needs.