Fixed NullPointerException when adding a tag with a null value. Added log error statement to catch in the future.