<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _check_no_current_table(new_obj, current_table):
 """ Raises exception if we try to add a relation or a column with no current table. """

    if current_table is None:
        msg = 'Cannot add {} before adding table'
        if isinstance(new_obj, Relation):
            raise NoCurrentTableException(msg.format('relation'))
        if isinstance(new_obj, Column):
            raise NoCurrentTableException(msg.format('column'))