Created import and implemented safer check.