Changed select to where it returns null on not found, rather than throwing an exception