Check function now works with string pointers