Add some conditionals to avoid errors if data isn't initialized in the database yet