7. Update. Can pass lesson but nil doesn't properly return the puts message


when "update" 
    puts "Enter a movie name"
    title = gets.chomp
if movies[title.to_sym].nil
    puts "#{title} does not exist in the database!"
    puts "please enter a new rating (Enter a number between 0-5)"
    rating = gets.chomp
    movies [title.to_sym] = rating.to_i
    puts "#{title} has been updated with a new rating of #{rating}"

instead of #{title} does not exist in the database!, I get the below:

undefined method `nil' for nil:NilClass


You need to add the question mark at the end of .nil so that it will perform a Boolean test. The 4th line should read like this:

if movies[title.to_sym].nil?