added type check for imgur