catch possible key error