fixed null title error

condition where an empty title is saved to database has been remedied