class ActiveStorage::Attached::One

def blank?

User.new.avatar.blank? # => true

end
has_one_attached :avatar
class User < ApplicationRecord

Returns +true+ if an attachment is not attached.
def blank?
  !attached?
end